﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using PowerCreator.LMS.Action.Entity;

public partial class sysadmin_Left :PowerCreator.LMS.Web.Base.BasePage
{
    PowerCreator.LMS.Web.Menu.Menu opMenu = new PowerCreator.LMS.Web.Menu.Menu();
    PowerCreator.LMS.Web.Language.WebLanguage language = new PowerCreator.LMS.Web.Language.WebLanguage();

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            pl_Channel.Visible = false;
            pl_Project.Visible = false;
            pl_Vir.Visible = false;
            pl_User.Visible = false;
            pl_Sys.Visible = false;
            pl_Role.Visible = false;
            pl_QuestionManager.Visible = false;
            pl_Question.Visible = false;
            pl_Project.Visible = false;
            pl_Msg.Visible = false;
            pl_Down.Visible = false;
            pl_BBS.Visible = false;
            pl_Default.Visible = false;
            pl_Course.Visible = false;                                              
            pl_Count.Visible = false;
            pl_Cms.Visible = false;
            pl_Sys.Visible = false;
            pl_PaperResearch.Visible = false;
            pl_grade.Visible = false;
            pl_Mavin.Visible = false;
            pl_NetMeeting.Visible = false;
            pl_Task.Visible = false;

            string menuname = "course";

            if (Request.QueryString["MenuName"] != null)
            {
                menuname = Request.QueryString["MenuName"].ToString();
            }
            ViewState["MenuName"] = menuname;

            if (ViewState["MenuName"].ToString().ToLower() == "default")
            {
                pl_Default.Visible = true;
            }

            else if (ViewState["MenuName"].ToString().ToLower() == "project")
            {
               // lbl_Project.Text = GetLanageValueByKey(PowerCreator.LMS.Web.Menu.MenuType.ProjectManager, PowerCreator.LMS.Language.LanagetItemType.MenuItemColumn);
                //VOTActionColumn voActionColumn = opMenu.QueryActionColumn(PowerCreator.LMS.Web.Menu.MenuType.ProjectManager);
                //DataTable dt_Project = opMenu.QueryActionByColumn(voActionColumn);
                //if (dt_Project != null)
                //{
                //    dt_Project.Columns.Add("MenuName1");
                //    dt_Project.Columns.Add("MenuNameUrl1");

                //    for (int i = 0; i < dt_Project.Rows.Count; i++)
                //    {
                //        dt_Project.Rows[i]["MenuName1"] = GetLanageValueByKey(dt_Project.Rows[i]["ActionVariable"].ToString(), PowerCreator.LMS.Language.LanagetItemType.MenuItem);
                //        PowerCreator.LMS.Language.LanguageMenuItem item = GetMenuLanageBy(dt_Project.Rows[i]["ActionVariable"].ToString(), PowerCreator.LMS.Language.LanagetItemType.MenuItem);
                //        if (item != null)
                //        {
                //            dt_Project.Rows[i]["MenuNameUrl1"] = item.PageUrl;
                //            if (item.PageType != "2") dt_Project.Rows[i].Delete();     //过虑删除类型的动作
                //        }
                //        else
                //        {
                //            dt_Project.Rows[i].Delete();
                //        }
                //    }
                //    rpt_Project.DataSource = dt_Project;
                //    rpt_Project.DataBind();
                //}
                pl_Project.Visible = true;
                
            }
            else if (ViewState["MenuName"].ToString().ToLower() == "user")
            {
                //lbl_User.Text = GetLanageValueByKey(PowerCreator.LMS.Web.Menu.MenuType.UserManager, PowerCreator.LMS.Language.LanagetItemType.MenuItemColumn);
                //VOTActionColumn voActionColumn = opMenu.QueryActionColumn(PowerCreator.LMS.Web.Menu.MenuType.UserManager);
                //DataTable dt_User = opMenu.QueryActionByColumn(voActionColumn);
                //if (dt_User != null)
                //{
                //    dt_User.Columns.Add("MenuName1");
                //    dt_User.Columns.Add("MenuNameUrl1");

                //    for (int i = 0; i < dt_User.Rows.Count; i++)
                //    {
                //        dt_User.Rows[i]["MenuName1"] = GetLanageValueByKey(dt_User.Rows[i]["ActionVariable"].ToString(), PowerCreator.LMS.Language.LanagetItemType.MenuItem);
                //        PowerCreator.LMS.Language.LanguageMenuItem item = GetMenuLanageBy(dt_User.Rows[i]["ActionVariable"].ToString(), PowerCreator.LMS.Language.LanagetItemType.MenuItem);
                //        if (item != null)
                //        {
                //            dt_User.Rows[i]["MenuNameUrl1"] = item.PageUrl;
                //            if (item.PageType != "2") dt_User.Rows[i].Delete();     //过虑删除类型的动作
                //        }
                //        else
                //        {
                //            dt_User.Rows[i].Delete();
                //        }
                //    }
                //    rpt_User.DataSource = dt_User;
                //    rpt_User.DataBind();
                //}
                pl_User.Visible = true;
            }
            else if (ViewState["MenuName"].ToString().ToLower() == "role")
            {
               // lbl_RoleManager.Text = GetLanageValueByKey(PowerCreator.LMS.Web.Menu.MenuType.RoleManager, PowerCreator.LMS.Language.LanagetItemType.MenuItemColumn);
                VOTActionColumn voActionColumn = opMenu.QueryActionColumn(PowerCreator.LMS.Web.Menu.MenuType.RoleManager);
                DataTable dt_role = opMenu.QueryActionByColumn(voActionColumn);
                if (dt_role != null)
                {
                    dt_role.Columns.Add("MenuName1");
                    dt_role.Columns.Add("MenuNameUrl1");

                    for (int i = 0; i < dt_role.Rows.Count; i++)
                    {
                        dt_role.Rows[i]["MenuName1"] = GetLanageValueByKey(dt_role.Rows[i]["ActionVariable"].ToString(), PowerCreator.LMS.Language.LanagetItemType.MenuItem);
                        PowerCreator.LMS.Language.LanguageMenuItem item = GetMenuLanageBy(dt_role.Rows[i]["ActionVariable"].ToString(), PowerCreator.LMS.Language.LanagetItemType.MenuItem);
                        if (item != null)
                        {
                            dt_role.Rows[i]["MenuNameUrl1"] = item.PageUrl;
                            if (item.PageType != "2") dt_role.Rows[i].Delete();     //过虑删除类型的动作
                        }
                        else
                        {
                            dt_role.Rows[i].Delete();
                        }
                    }
                    rpt_Role.DataSource = dt_role;
                    rpt_Role.DataBind();
                }
                pl_Role.Visible = true;
            }
            else if (ViewState["MenuName"].ToString().ToLower() == "vir")
            {
                pl_Vir.Visible = true;
            }
            else if (ViewState["MenuName"].ToString().ToLower() == "course")
            {
              //  lbl_Course.Text = GetLanageValueByKey(PowerCreator.LMS.Web.Menu.MenuType.CourseManager, PowerCreator.LMS.Language.LanagetItemType.MenuItemColumn);
                VOTActionColumn voActionColumn = opMenu.QueryActionColumn(PowerCreator.LMS.Web.Menu.MenuType.CourseManager);
                DataTable dt_Course = opMenu.QueryActionByColumn(voActionColumn);
                if (dt_Course != null)
                {
                    dt_Course.Columns.Add("MenuName1");
                    dt_Course.Columns.Add("MenuNameUrl1");

                    for (int i = 0; i < dt_Course.Rows.Count; i++)
                    {
                        dt_Course.Rows[i]["MenuName1"] = GetLanageValueByKey(dt_Course.Rows[i]["ActionVariable"].ToString(), PowerCreator.LMS.Language.LanagetItemType.MenuItem);
                        PowerCreator.LMS.Language.LanguageMenuItem item = GetMenuLanageBy(dt_Course.Rows[i]["ActionVariable"].ToString(), PowerCreator.LMS.Language.LanagetItemType.MenuItem);
                        if (item != null)
                        {
                            dt_Course.Rows[i]["MenuNameUrl1"] = item.PageUrl;
                            if (item.PageType != "2") dt_Course.Rows[i].Delete();     //过虑删除类型的动作
                        }
                        else
                        {
                            dt_Course.Rows[i].Delete();
                        }
                    }
                    rpt_Course.DataSource = dt_Course;
                    rpt_Course.DataBind();
                }
                pl_Course.Visible = true;
            }
            else if (ViewState["MenuName"].ToString().ToLower() == "question")
            {
               // lbl_Question.Text = GetLanageValueByKey(PowerCreator.LMS.Web.Menu.MenuType.QuestionManager, PowerCreator.LMS.Language.LanagetItemType.MenuItemColumn);
                VOTActionColumn voActionColumn = opMenu.QueryActionColumn(PowerCreator.LMS.Web.Menu.MenuType.QuestionManager);
                DataTable dt_question = opMenu.QueryActionByColumn(voActionColumn);
                if (dt_question != null)
                {
                    dt_question.Columns.Add("MenuName1");
                    dt_question.Columns.Add("MenuNameUrl1");

                    for (int i = 0; i < dt_question.Rows.Count; i++)
                    {
                        dt_question.Rows[i]["MenuName1"] = GetLanageValueByKey(dt_question.Rows[i]["ActionVariable"].ToString(), PowerCreator.LMS.Language.LanagetItemType.MenuItem);
                        PowerCreator.LMS.Language.LanguageMenuItem item = GetMenuLanageBy(dt_question.Rows[i]["ActionVariable"].ToString(), PowerCreator.LMS.Language.LanagetItemType.MenuItem);
                        if (item != null)
                        {
                            dt_question.Rows[i]["MenuNameUrl1"] = item.PageUrl;
                            if (item.PageType != "2") dt_question.Rows[i].Delete();     //过虑删除类型的动作
                        }
                        else
                        {
                            dt_question.Rows[i].Delete();
                        }
                    }
                    rpt_Question.DataSource = dt_question;
                    rpt_Question.DataBind();
                }
                pl_Question.Visible = true;
            }
            else if (ViewState["MenuName"].ToString().ToLower() == "questionmanager")
            {
                pl_QuestionManager.Visible = true;
            }
            else if (ViewState["MenuName"].ToString().ToLower() == "cms")
            {
               // lbl_news.Text = GetLanageValueByKey(PowerCreator.LMS.Web.Menu.MenuType.NewsManager, PowerCreator.LMS.Language.LanagetItemType.MenuItemColumn);
                VOTActionColumn voActionColumn = opMenu.QueryActionColumn(PowerCreator.LMS.Web.Menu.MenuType.NewsManager);
                DataTable dt_new = opMenu.QueryActionByColumn(voActionColumn);
                if (dt_new != null)
                {
                    dt_new.Columns.Add("MenuName1");
                    dt_new.Columns.Add("MenuNameUrl1");

                    for (int i = 0; i < dt_new.Rows.Count; i++)
                    {
                        dt_new.Rows[i]["MenuName1"] = GetLanageValueByKey(dt_new.Rows[i]["ActionVariable"].ToString(), PowerCreator.LMS.Language.LanagetItemType.MenuItem);
                        PowerCreator.LMS.Language.LanguageMenuItem item = GetMenuLanageBy(dt_new.Rows[i]["ActionVariable"].ToString(), PowerCreator.LMS.Language.LanagetItemType.MenuItem);
                        if (item != null)
                        {
                            dt_new.Rows[i]["MenuNameUrl1"] = item.PageUrl;
                            if (item.PageType != "2") dt_new.Rows[i].Delete();     //过虑删除类型的动作
                        }
                        else
                        {
                            dt_new.Rows[i].Delete();
                        }
                    }
                    rpt_News.DataSource = dt_new;
                    rpt_News.DataBind();
                }
                pl_Cms.Visible = true;
            }


            else if (ViewState["MenuName"].ToString().ToLower() == "net")
            {
                // lbl_Download.Text = GetLanageValueByKey(PowerCreator.LMS.Web.Menu.MenuType.DownloadManager, PowerCreator.LMS.Language.LanagetItemType.MenuItemColumn);
                VOTActionColumn voActionColumn = opMenu.QueryActionColumn(PowerCreator.LMS.Web.Menu.MenuType.NetMeetingManager);
                DataTable dt_down = opMenu.QueryActionByColumn(voActionColumn);
                if (dt_down != null)
                {
                    dt_down.Columns.Add("MenuName1");
                    dt_down.Columns.Add("MenuNameUrl1");

                    for (int i = 0; i < dt_down.Rows.Count; i++)
                    {
                        dt_down.Rows[i]["MenuName1"] = GetLanageValueByKey(dt_down.Rows[i]["ActionVariable"].ToString(), PowerCreator.LMS.Language.LanagetItemType.MenuItem);
                        PowerCreator.LMS.Language.LanguageMenuItem item = GetMenuLanageBy(dt_down.Rows[i]["ActionVariable"].ToString(), PowerCreator.LMS.Language.LanagetItemType.MenuItem);
                        if (item != null)
                        {
                            dt_down.Rows[i]["MenuNameUrl1"] = item.PageUrl;
                            if (item.PageType != "2") dt_down.Rows[i].Delete();     //过虑删除类型的动作
                        }
                        else
                        {
                            dt_down.Rows[i].Delete();
                        }
                    }
                    rpt_Download.DataSource = dt_down;
                    rpt_Download.DataBind();
                }
                pl_Down.Visible = true;
            }
            else if (ViewState["MenuName"].ToString().ToLower() == "down")
            {
               // lbl_Download.Text = GetLanageValueByKey(PowerCreator.LMS.Web.Menu.MenuType.DownloadManager, PowerCreator.LMS.Language.LanagetItemType.MenuItemColumn);
                VOTActionColumn voActionColumn = opMenu.QueryActionColumn(PowerCreator.LMS.Web.Menu.MenuType.DownloadManager);
                DataTable dt_down = opMenu.QueryActionByColumn(voActionColumn);
                if (dt_down != null)
                {
                    dt_down.Columns.Add("MenuName1");
                    dt_down.Columns.Add("MenuNameUrl1");

                    for (int i = 0; i < dt_down.Rows.Count; i++)
                    {
                        dt_down.Rows[i]["MenuName1"] = GetLanageValueByKey(dt_down.Rows[i]["ActionVariable"].ToString(), PowerCreator.LMS.Language.LanagetItemType.MenuItem);
                        PowerCreator.LMS.Language.LanguageMenuItem item = GetMenuLanageBy(dt_down.Rows[i]["ActionVariable"].ToString(), PowerCreator.LMS.Language.LanagetItemType.MenuItem);
                        if (item != null)
                        {
                            dt_down.Rows[i]["MenuNameUrl1"] = item.PageUrl;
                            if (item.PageType != "2") dt_down.Rows[i].Delete();     //过虑删除类型的动作
                        }
                        else
                        {
                            dt_down.Rows[i].Delete();
                        }
                    }
                    rpt_Download.DataSource = dt_down;
                    rpt_Download.DataBind();
                }
                pl_Down.Visible = true;
            }
            else if (ViewState["MenuName"].ToString().ToLower() == "bbs")
            {
                            //更改到系统维护中
                pl_BBS.Visible = true;
            }
            else if (ViewState["MenuName"].ToString().ToLower() == "channel")
            {
                pl_Channel.Visible = true;
            }
            else if (ViewState["MenuName"].ToString().ToLower() == "count")
            {
                pl_Count.Visible = true;
            }
            else if (ViewState["MenuName"].ToString().ToLower() == "sys")
            {
                //虚拟目录管理
               // lbl_Vir.Text = GetLanageValueByKey(PowerCreator.LMS.Web.Menu.MenuType.DirectoyManager, PowerCreator.LMS.Language.LanagetItemType.MenuItemColumn);
                VOTActionColumn voActionColumn = opMenu.QueryActionColumn(PowerCreator.LMS.Web.Menu.MenuType.DirectoyManager);
                DataTable dt_vir = opMenu.QueryActionByColumn(voActionColumn);
                if (dt_vir != null)
                {
                    dt_vir.Columns.Add("MenuName1");
                    dt_vir.Columns.Add("MenuNameUrl1");

                    for (int i = 0; i < dt_vir.Rows.Count; i++)
                    {
                        dt_vir.Rows[i]["MenuName1"] = GetLanageValueByKey(dt_vir.Rows[i]["ActionVariable"].ToString(), PowerCreator.LMS.Language.LanagetItemType.MenuItem);
                        PowerCreator.LMS.Language.LanguageMenuItem item = GetMenuLanageBy(dt_vir.Rows[i]["ActionVariable"].ToString(), PowerCreator.LMS.Language.LanagetItemType.MenuItem);
                        if (item != null)
                        {
                            dt_vir.Rows[i]["MenuNameUrl1"] = item.PageUrl;
                            if (item.PageType != "2")
                            {
                                dt_vir.Rows[i].Delete();     //过虑删除类型的动作
                            }
                        }
                        else
                        {
                            dt_vir.Rows[i].Delete();
                        }
                    }
                    rpt_Vir.DataSource = dt_vir;
                    rpt_Vir.DataBind();
                }

                //论坛管理
              //  lbl_BBS.Text = GetLanageValueByKey(PowerCreator.LMS.Web.Menu.MenuType.BBSManager, PowerCreator.LMS.Language.LanagetItemType.MenuItemColumn);
                voActionColumn = opMenu.QueryActionColumn(PowerCreator.LMS.Web.Menu.MenuType.BBSManager);
                DataTable dt_bbs = opMenu.QueryActionByColumn(voActionColumn);
                if (dt_bbs != null)
                {
                    dt_bbs.Columns.Add("MenuName1");
                    dt_bbs.Columns.Add("MenuNameUrl1");

                    for (int i = 0; i < dt_bbs.Rows.Count; i++)
                    {
                        dt_bbs.Rows[i]["MenuName1"] = GetLanageValueByKey(dt_bbs.Rows[i]["ActionVariable"].ToString(), PowerCreator.LMS.Language.LanagetItemType.MenuItem);
                        PowerCreator.LMS.Language.LanguageMenuItem item = GetMenuLanageBy(dt_bbs.Rows[i]["ActionVariable"].ToString(), PowerCreator.LMS.Language.LanagetItemType.MenuItem);
                        if (item != null)
                        {
                            dt_bbs.Rows[i]["MenuNameUrl1"] = item.PageUrl;
                            if (item.PageType != "2")
                            {
                                dt_bbs.Rows[i].Delete();     //过虑删除类型的动作

                            }
                        }
                        else
                        {
                            dt_bbs.Rows[i].Delete();
                        }
                    }
                }

                rpt_BBS.DataSource = dt_bbs;
                rpt_BBS.DataBind();
                rpt_BBS.Visible = true;

                //在线回复管理
                voActionColumn = opMenu.QueryActionColumn("ColumnSysConfig");
                DataTable dt_sysconfig = opMenu.QueryActionByColumn(voActionColumn);
                if (dt_sysconfig != null)
                {
                    dt_sysconfig.Columns.Add("MenuName1");
                    dt_sysconfig.Columns.Add("MenuNameUrl1");

                    for (int i = 0; i < dt_sysconfig.Rows.Count; i++)
                    {
                        dt_sysconfig.Rows[i]["MenuName1"] = GetLanageValueByKey(dt_sysconfig.Rows[i]["ActionVariable"].ToString(), PowerCreator.LMS.Language.LanagetItemType.MenuItem);
                        PowerCreator.LMS.Language.LanguageMenuItem item = GetMenuLanageBy(dt_sysconfig.Rows[i]["ActionVariable"].ToString(), PowerCreator.LMS.Language.LanagetItemType.MenuItem);
                        if (item != null)
                        {
                            dt_sysconfig.Rows[i]["MenuNameUrl1"] = item.PageUrl;
                            if (item.PageType != "2")
                            {
                                dt_sysconfig.Rows[i].Delete();     //过虑删除类型的动作
                            }
                        }
                        else
                        {
                            dt_sysconfig.Rows[i].Delete();
                        }
                    }
                }
                rpt_Refer.DataSource = dt_sysconfig;
                rpt_Refer.DataBind();
                rpt_Refer.Visible = true;

                //系统设置
                pl_Sys.Visible = true;
            }
            else if (ViewState["MenuName"].ToString().ToLower() == "questionresearch")
            {
                VOTActionColumn voActionColumn = opMenu.QueryActionColumn(PowerCreator.LMS.Web.Menu.MenuType.PaperResearchManager);
                DataTable dt_new = opMenu.QueryActionByColumn(voActionColumn);
                if (dt_new != null)
                {
                    dt_new.Columns.Add("MenuName1");
                    dt_new.Columns.Add("MenuNameUrl1");

                    for (int i = 0; i < dt_new.Rows.Count; i++)
                    {
                        dt_new.Rows[i]["MenuName1"] = GetLanageValueByKey(dt_new.Rows[i]["ActionVariable"].ToString(), PowerCreator.LMS.Language.LanagetItemType.MenuItem);
                        PowerCreator.LMS.Language.LanguageMenuItem item = GetMenuLanageBy(dt_new.Rows[i]["ActionVariable"].ToString(), PowerCreator.LMS.Language.LanagetItemType.MenuItem);
                        if (item != null)
                        {
                            dt_new.Rows[i]["MenuNameUrl1"] = item.PageUrl;
                            if (item.PageType != "2") dt_new.Rows[i].Delete();     //过虑删除类型的动作
                        }
                        else
                        {
                            dt_new.Rows[i].Delete();
                        }
                    }
                    rpt_PaperResearch.DataSource = dt_new;
                    rpt_PaperResearch.DataBind();
                }
                pl_PaperResearch.Visible = true;
            }
            else if (ViewState["MenuName"].ToString().ToLower() == "grade")
            {
                VOTActionColumn voActionColumn = opMenu.QueryActionColumn(PowerCreator.LMS.Web.Menu.MenuType.GradeManager);
                DataTable dt_new = opMenu.QueryActionByColumn(voActionColumn);
                if (dt_new != null)
                {
                    dt_new.Columns.Add("MenuName1");
                    dt_new.Columns.Add("MenuNameUrl1");

                    for (int i = 0; i < dt_new.Rows.Count; i++)
                    {
                        dt_new.Rows[i]["MenuName1"] = GetLanageValueByKey(dt_new.Rows[i]["ActionVariable"].ToString(), PowerCreator.LMS.Language.LanagetItemType.MenuItem);
                        PowerCreator.LMS.Language.LanguageMenuItem item = GetMenuLanageBy(dt_new.Rows[i]["ActionVariable"].ToString(), PowerCreator.LMS.Language.LanagetItemType.MenuItem);
                        if (item != null)
                        {
                            dt_new.Rows[i]["MenuNameUrl1"] = item.PageUrl;
                            if (item.PageType != "2") dt_new.Rows[i].Delete();     //过虑删除类型的动作
                        }
                        else
                        {
                            dt_new.Rows[i].Delete();
                        }
                    }
                    rpt_grade.DataSource = dt_new;
                    rpt_grade.DataBind();
                }
                pl_grade.Visible = true;
            }

            else if (ViewState["MenuName"].ToString().ToLower() == "mavin")
            {
                VOTActionColumn voActionColumn = opMenu.QueryActionColumn(PowerCreator.LMS.Web.Menu.MenuType.MavinManager);
                DataTable dt_Mavin = opMenu.QueryActionByColumn(voActionColumn);
                if (dt_Mavin != null)
                {
                    dt_Mavin.Columns.Add("MenuName1");
                    dt_Mavin.Columns.Add("MenuNameUrl1");

                    for (int i = 0; i < dt_Mavin.Rows.Count; i++)
                    {
                        dt_Mavin.Rows[i]["MenuName1"] = GetLanageValueByKey(dt_Mavin.Rows[i]["ActionVariable"].ToString(), PowerCreator.LMS.Language.LanagetItemType.MenuItem);
                        PowerCreator.LMS.Language.LanguageMenuItem item = GetMenuLanageBy(dt_Mavin.Rows[i]["ActionVariable"].ToString(), PowerCreator.LMS.Language.LanagetItemType.MenuItem);
                        if (item != null)
                        {
                            dt_Mavin.Rows[i]["MenuNameUrl1"] = item.PageUrl;
                            if (item.PageType != "2") dt_Mavin.Rows[i].Delete();     //过虑删除类型的动作
                        }
                        else
                        {
                            dt_Mavin.Rows[i].Delete();
                        }
                    }
                    rpt_Mavin.DataSource = dt_Mavin;
                    rpt_Mavin.DataBind();
                }
                pl_Mavin.Visible = true;
            }
            else if (ViewState["MenuName"].ToString().ToLower() == "task")
            {
                VOTActionColumn voActionColumn = opMenu.QueryActionColumn(PowerCreator.LMS.Web.Menu.MenuType.TaskManager);
                DataTable dt_Task = opMenu.QueryActionByColumn(voActionColumn);
                if (dt_Task != null)
                {
                    dt_Task.Columns.Add("MenuName1");
                    dt_Task.Columns.Add("MenuNameUrl1");

                    for (int i = 0; i < dt_Task.Rows.Count; i++)
                    {
                        dt_Task.Rows[i]["MenuName1"] = GetLanageValueByKey(dt_Task.Rows[i]["ActionVariable"].ToString(), PowerCreator.LMS.Language.LanagetItemType.MenuItem);
                        PowerCreator.LMS.Language.LanguageMenuItem item = GetMenuLanageBy(dt_Task.Rows[i]["ActionVariable"].ToString(), PowerCreator.LMS.Language.LanagetItemType.MenuItem);
                        if (item != null)
                        {
                            dt_Task.Rows[i]["MenuNameUrl1"] = item.PageUrl;
                            if (item.PageType != "2") dt_Task.Rows[i].Delete();     //过虑删除类型的动作
                        }
                        else
                        {
                            dt_Task.Rows[i].Delete();
                        }
                    }
                    rpt_Task.DataSource = dt_Task;
                    rpt_Task.DataBind();
                }
                pl_Task.Visible = true;
            }

        }
    }

    protected override void InitPage()
    {
        base.InitPage();
    }
    protected void rpt_Role_ItemCommand(object source, RepeaterCommandEventArgs e)
    {
        if (e.CommandName.ToString() == "open")
        {
            LinkButton lnkbtn = (LinkButton)e.Item.FindControl("lnkbtn_url");
            lnkbtn.CssClass = "leftclick";
        }
    }
}
